<!--
 * @Description: 
 * @Author: 赵华宇
 * @Date: 2025-04-22 16:52:42
 * @LastEditors: 赵华宇
 * @LastEditTime: 2025-04-22 16:57:36
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伪元素选择器</title>
    <style>
        div{
            width: 300px;
            height: 300px;
            background-color:pink;
        }
        /* 行内显示模式 */
        div::before{
            content:"老鼠";
            width: 100px;
            height: 100px;
            background-color: brown;
        }
        div::after{
            content:"大米";
            width: 100px;
            height: 100px;
            background-color: blue;
        }
    </style>
</head>
<body>
    <!-- 标签内容 老鼠爱大米 -->
    <div>爱</div>
</body>
</html>